﻿@using BV.PACS.WEB.Shared.Models
@inherits BV.PACS.WEB.Client.Sources.SourceSearchPanelCode

<DxFormLayout CaptionPosition="@CaptionPosition.Vertical">
    <DxFormLayoutItem Caption="@Translations.SourceBarcode" ColSpanLg="12" ColSpanMd="12">
        <Template>
            <DxTextBox @bind-Text="@SourceBarcode"></DxTextBox>
        </Template>
    </DxFormLayoutItem>

    <DxFormLayoutItem Caption="@Translations.SourceCreationDateFrom" ColSpanLg="6" ColSpanMd="12">
        <Template>
            <DxDateEdit @bind-Date="@StartDate"></DxDateEdit>
        </Template>
    </DxFormLayoutItem>
    <DxFormLayoutItem Caption="@Translations.SourceCreationDateTo" ColSpanLg="6" ColSpanMd="12">
        <Template>
            <DxDateEdit @bind-Date="@EndDate"></DxDateEdit>
        </Template>
    </DxFormLayoutItem>

    <DxFormLayoutItem Caption="@Translations.SourceTemplateName" ColSpanLg="12" ColSpanMd="12">
        <Template>

            <DxComboBox Data="@Templates"
                        TextFieldName="Name"
                        NullText="@PacsMessagesTranslations.SelectTemplate"
                        @bind-SelectedItem="@Template">
            </DxComboBox>

        </Template>
    </DxFormLayoutItem>

    <DxFormLayoutItem Caption="@Translations.SourceNote" ColSpanLg="12" ColSpanMd="12">
        <Template>
            <DxTextBox @bind-Text="@SourceNotes"></DxTextBox>
        </Template>
    </DxFormLayoutItem>

    <DxFormLayoutItem Caption="@Translations.MaterialBarcodes" ColSpanLg="12" ColSpanMd="12">
        <Template>
            <DxTextBox @bind-Text="@MaterialBarcode"></DxTextBox>
        </Template>
    </DxFormLayoutItem>

    <DxFormLayoutItem Caption="@Translations.AliquotBarcodes" ColSpanLg="12" ColSpanMd="12">
        <Template>
            <DxTextBox @bind-Text="@AliquotBarcode"></DxTextBox>
        </Template>
    </DxFormLayoutItem>

    <DxFormLayoutItem Caption="@Translations.TestStatuses" ColSpanLg="12" ColSpanMd="12">
        <Template>
            <DxComboBox Data="@_testStatuses"
                        TextFieldName="Name"
                        @bind-SelectedItem="@TestStatus">
            </DxComboBox>
        </Template>
    </DxFormLayoutItem>
    <DxFormLayoutItem Caption="@Translations.TestTypes" ColSpanLg="12" ColSpanMd="12">
        <Template>
            <DxComboBox Data="@_testTypes"
                        TextFieldName="Name"
                        @bind-SelectedItem="@TestType">
            </DxComboBox>
        </Template>
    </DxFormLayoutItem>
    <DxFormLayoutItem Caption="@Translations.TestResults" ColSpanLg="12" ColSpanMd="12">
        <Template>
            <DxComboBox Data="@_testResults"
                        TextFieldName="Name"
                        @bind-SelectedItem="@TestResult">
            </DxComboBox>
        </Template>
    </DxFormLayoutItem>

    <DxFormLayoutItem ColSpanLg="6" ColSpanMd="6">
        <Template>
            <button @onclick="@DoSearch" class="btn btn-primary">@Translations.Search</button>
        </Template>
    </DxFormLayoutItem>
    <DxFormLayoutItem ColSpanLg="6" ColSpanMd="6">
        <Template>
            <button @onclick="@DoClear" class="btn btn-secondary">@Translations.Clear</button>
        </Template>
    </DxFormLayoutItem>
</DxFormLayout>